/* ===== SIXTEEN BRAIN BASICS - COMPLETE STYLES ===== */

/* ===== VARIABLES ===== */
:root {
    --sixteen-primary-bg: #f5f4ed;
    --sixteen-secondary-bg: #ffc62f;
    --sixteen-font-color: #1e1e1e;
    --sixteen-gradient-1: linear-gradient(135deg, #ffebc4 0%, #ffebc4ad 100%);
    --sixteen-gradient-2: linear-gradient(45deg, #dfab46 40%, #dfb86d 40%, #dfab46 61%);
}

/* ===== MODAL OVERLAY ===== */
.sixteen-brain-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.sixteen-brain-modal.active {
    display: flex;
}

/* ===== MODAL CONTENT ===== */
.sixteen-modal-content {
    background: var(--sixteen-gradient-1);
    border-radius: 30px;
    padding: 30px;
    max-width: 1200px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: sixteenSlideUp 0.5s ease-out;
    position: relative;
    border: 6px solid var(--sixteen-secondary-bg);
}

@keyframes sixteenSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== CLOSE BUTTON ===== */
.sixteen-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--sixteen-font-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-weight: bold;
}

.sixteen-modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: #ff4444;
}

/* ===== MODAL HEADER ===== */
.sixteen-modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--sixteen-secondary-bg);
}

.sixteen-modal-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--sixteen-font-color);
    margin-bottom: 15px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.sixteen-score-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--sixteen-secondary-bg);
    padding: 12px 25px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sixteen-score-label {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: bold;
    color: var(--sixteen-font-color);
}

.sixteen-score-value {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 900;
    color: var(--sixteen-font-color);
}

/* ===== TAB NAVIGATION ===== */
.sixteen-tab-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.sixteen-tab-btn {
    background: white;
    border: 3px solid #ddd;
    padding: 15px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sixteen-tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.sixteen-tab-btn.active {
    background: var(--sixteen-secondary-bg);
    border-color: var(--sixteen-font-color);
    transform: translateY(-3px);
}

.sixteen-tab-text {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: bold;
    color: var(--sixteen-font-color);
}

/* ===== TAB PANES ===== */
.sixteen-modal-body {
    background: var(--sixteen-primary-bg);
    border-radius: 20px;
    padding: 25px;
    min-height: 400px;
}

.sixteen-tab-pane {
    display: none;
    animation: sixteenFadeIn 0.4s ease-out;
}

.sixteen-tab-pane.active {
    display: block;
}

@keyframes sixteenFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== THEORY TAB ===== */
.sixteen-theory-pane h3 {
    color: var(--sixteen-font-color);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 1.5rem 0 1rem 0;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--sixteen-secondary-bg);
    padding-bottom: 0.5rem;
}

.sixteen-theory-pane p {
    color: #2d3748;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    margin: 1rem 0;
    font-weight: 500;
}

.sixteen-theory-pane ul,
.sixteen-theory-pane ol {
    margin: 1rem 0 1rem 1.5rem;
    padding-left: 1.5rem;
}

.sixteen-theory-pane li {
    color: #374151;
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
    line-height: 1.7;
    margin: 0.8rem 0;
    font-weight: 500;
}

.sixteen-theory-pane ul li::marker {
    color: var(--sixteen-secondary-bg);
    font-size: 1.4em;
    font-weight: bold;
}

.sixteen-theory-pane ol li::marker {
    color: var(--sixteen-font-color);
    font-weight: bold;
}

/* ===== GAME TAB ===== */
.sixteen-game-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--sixteen-font-color);
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.sixteen-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1024px;
    margin: 20px auto;
}

.sixteen-labels-source {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.sixteen-draggable-label {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: grab;
    font-weight: bold;
    user-select: none;
    touch-action: none;
    position: relative;
    z-index: 10;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease-out;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-size: var(--fs-10-16);
    padding: 0.5em 0.75em;
}

.sixteen-draggable-label:active {
    cursor: grabbing;
}

.sixteen-brain-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    border: 1px solid #ccc;
    padding-top: 80.96%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sixteen-brain-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sixteen-drop-target {
    position: absolute;
    width: 80px;
    height: 40px;
    background-color: rgba(255, 0, 0, 0.4);
    border-radius: 5px;
    border: 2px dashed #FF0000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: #333;
    transition: background-color 0.3s, border-color 0.3s;
}

.sixteen-drop-target.sixteen-correct {
    background-color: rgba(0, 255, 0, 0.4);
    border-color: #00FF00;
}

.sixteen-drop-target.sixteen-filled {
    border: none;
    background: none;
}

.sixteen-game-feedback {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    margin: 20px 0;
    min-height: 30px;
    text-align: center;
    color: var(--sixteen-font-color);
    font-weight: 600;
}

/* ===== QUIZ TAB ===== */
.sixteen-quiz-start,
.sixteen-quiz-question-screen,
.sixteen-quiz-result {
    padding: 20px;
}

.sixteen-quiz-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--sixteen-font-color);
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.sixteen-quiz-intro {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sixteen-quiz-desc {
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
    font-weight: 600;
}

.sixteen-score-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.sixteen-score-item {
    background: var(--sixteen-gradient-1);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sixteen-quiz-header {
    margin-bottom: 25px;
}

.sixteen-question-number {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--sixteen-font-color);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 800;
}

.sixteen-progress-bar {
    background: #ddd;
    height: 15px;
    border-radius: 10px;
    overflow: hidden;
}

.sixteen-progress-fill {
    background: var(--sixteen-secondary-bg);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.sixteen-question-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sixteen-question-text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: bold;
    color: var(--sixteen-font-color);
    line-height: 1.5;
    text-align: center;
}

.sixteen-options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.sixteen-quiz-option {
    background: white;
    border: 3px solid #ddd;
    padding: 20px;
    border-radius: 15px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: bold;
    color: var(--sixteen-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sixteen-quiz-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--sixteen-secondary-bg);
}

.sixteen-quiz-option.sixteen-selected {
    background: var(--sixteen-secondary-bg);
    border-color: var(--sixteen-font-color);
    transform: translateY(-3px);
}

.sixteen-result-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--sixteen-font-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
}

.sixteen-result-score-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.sixteen-result-main-score {
    text-align: center;
}

.sixteen-result-score-number {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--sixteen-secondary-bg);
    line-height: 1;
}

.sixteen-result-score-total {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #666;
}

.sixteen-result-percentage {
    width: 150px;
    height: 150px;
}

.sixteen-circular-progress {
    width: 100%;
    height: 100%;
}

.sixteen-circular-progress svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.sixteen-score-details {
    background: var(--sixteen-gradient-1);
    border-radius: 20px;
    padding: 25px;
    margin: 25px 0;
}

.sixteen-score-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.sixteen-score-detail-item:last-child {
    border-bottom: none;
}

.sixteen-detail-label {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #666;
    font-weight: 700;
}

.sixteen-detail-value {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: bold;
    color: var(--sixteen-font-color);
}

.sixteen-improvement-badge {
    background: #4caf50;
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    text-align: center;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: bold;
    margin-top: 15px;
}

.sixteen-saved-message {
    background: #4caf50;
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: bold;
    margin: 20px 0;
}

.sixteen-quiz-review {
    margin: 30px 0;
}

.sixteen-review-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--sixteen-font-color);
    margin-bottom: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 3px solid #ddd;
    font-weight: 900;
}

.sixteen-review-table-wrapper {
    overflow-x: auto;
}

.sixteen-review-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sixteen-review-table thead {
    background: var(--sixteen-secondary-bg);
}

.sixteen-review-table th {
    padding: 15px;
    text-align: left;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--sixteen-font-color);
    font-weight: bold;
}

.sixteen-review-table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #333;
    font-weight: 600;
}

.sixteen-review-table tr:last-child td {
    border-bottom: none;
}

.sixteen-correct-row {
    background: #e8f5e9;
}

.sixteen-wrong-row {
    background: #ffebee;
}

.sixteen-correct-answer-hint {
    display: block;
    font-size: clamp(0.8rem, 1.3vw, 0.9rem);
    color: #4caf50;
    font-weight: bold;
    margin-top: 5px;
}

.sixteen-result-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 10px;
    font-weight: bold;
    font-size: clamp(0.8rem, 1.3vw, 1rem);
}

.sixteen-badge-correct {
    background: #4caf50;
    color: white;
}

.sixteen-badge-wrong {
    background: #f44336;
    color: white;
}

/* ===== BUTTONS ===== */
.sixteen-btn-primary {
    background: var(--sixteen-font-color);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto;
}

.sixteen-btn-primary:hover:not(.sixteen-btn-disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: #333;
}

.sixteen-btn-primary.sixteen-btn-large {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    padding: 20px 50px;
}

.sixteen-btn-primary.sixteen-btn-disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.sixteen-btn-secondary {
    background: #666;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: block;
    margin: 15px auto;
}

.sixteen-btn-secondary:hover {
    background: #555;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.3);
}

/* ===== CUSTOM SCROLLBAR ===== */
.sixteen-modal-content::-webkit-scrollbar {
    width: 12px;
}

.sixteen-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sixteen-modal-content::-webkit-scrollbar-thumb {
    background: var(--sixteen-secondary-bg);
    border-radius: 10px;
}

.sixteen-modal-content::-webkit-scrollbar-thumb:hover {
    background: #e6b422;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .sixteen-modal-content {
        padding: 20px;
        border-radius: 20px;
    }

    .sixteen-tab-nav {
        flex-direction: row;
        justify-content: space-around;
    }

    .sixteen-tab-btn {
        min-width: 90px;
        padding: 12px 15px;
    }

    .sixteen-drop-target {
        width: 40px;
        height: 20px;
    }

    .sixteen-result-score-card {
        flex-direction: column;
    }
}
@media (max-width: 576px) {
    .sixteen-draggable-label{
        font-size: 6px;
    }
}
@media (max-width: 480px) {
    .sixteen-modal-content {
        padding: 15px;
    }

    .sixteen-modal-header {
        margin-bottom: 20px;
    }

    .sixteen-tab-btn {
        min-width: 80px;
        padding: 10px 12px;
    }

    .sixteen-tab-text {
        font-size: 0.8rem;
    }

    .sixteen-review-table {
        font-size: 0.85rem;
    }

    .sixteen-review-table th,
    .sixteen-review-table td {
        padding: 10px 5px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}